/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DataLogic;

/**
 *
 * @author GUR04686
 */
public class SchemaInfo extends TypeInfo {
    
    private Number length;     //length in bits of basic type
    private Number value;
    private String field_name;
    
    private String enumerationModule;
    private String enumeration;
    private String enumeration_value;
    
    private boolean value_type_magic;
    
    public String get_enum_module() {
        return enumerationModule;
    }
    
    public String get_enum_name() {
        return enumeration;
    }
    
    public String get_enum_val() {
        return enumeration_value;
    }
    
    public void set_field_name(String name) {
        field_name = name;
    }
    
    public String get_field_name() {
        return field_name;
    }
    public SchemaInfo(String name, long value, int length, TypeEnums type) {
        this.name = name;
        this.type = type;
        this.length = length;
        this.value = value;
        value_type_magic = true;
        
    }
    
    public void set_schema_enumeration(String module_name, String enum_name, String enum_value) {
        enumerationModule = module_name;
        enumeration = enum_name;
        enumeration_value = enum_value;
        value_type_magic = false;
    }
    
    public void set_schema_magic_value(Number value, Number length) {
        this.length = length;
        this.value = value;
        value_type_magic = true;
    }
    
    public Number get_value() {
        return value;
    }
    
    public Number get_length() {
        return length;
    }
    
    public boolean is_value_magic() {
        return value_type_magic;
    }
}
